package com.example.makerspace.dao;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.makerspace.domain.TaskOutComeReviewDO;
import com.example.makerspace.mapper.TaskOutComeReviewMapper;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
public class TaskOutComeReviewDAO extends  BaseDAO<TaskOutComeReviewDO> {
    @Resource
    private TaskOutComeReviewMapper taskOutComeReviewMapper;


    @PostConstruct
    public void init(){
        this.mapper = taskOutComeReviewMapper;
    }

    public TaskOutComeReviewDO selectByTaskIdAndOutComeId(Integer taskId, Integer outcomeId) {
        QueryWrapper<TaskOutComeReviewDO> wrapper = new QueryWrapper<>();
        wrapper.eq("task_id",taskId).eq("outcome_id",outcomeId);
        return  mapper.selectOne(wrapper);
    }
}
